<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动及其定位</title>
    <style>
        .box {
            display: inline-block;
            border-radius: 100px;
            background-color: blue;
            width: 100px;
            height: 100px;
            border: 5px solid red;

        }

        p{
            text-align: center;
            line-height: 50px;
            font-size: larger;
            display: block;
        }

       .box:nth-child(2n) {
            background-color: blue;
        }

        .box:nth-child(2n+1) {
            background-color: black;
        }
    </style>
</head>

<body>
    <div>
        <div class="box">
            <p><font color="white">1</font></p>
        </div>
        <div class="box">
            <p><font color="white">2</font></p>
        </div>
        <div class="box">
            <p><font color="white">3</font></p>
        </div>
        <div class="box">
            <p><font color="white">4</font></p>
        </div>
        <div class="box">
            <p><font color="white">5</font></p>
        </div>
        <div class="box">
            <p><font color="white">6</font></p>
        </div>
        <div class="box">
            <p><font color="white">7</font></p>
        </div>
        <div class="box">
            <p><font color="white">8</font></p>
        </div>
        <div class="box">
            <p><font color="white">9</font></p>
        </div>
        <div class="box">
            <p><font color="white">10</font></p>
        </div>
        <div class="box">
            <p><font color="white">11</font></p>
          
        </div>
        <div class="box">
            <p><font color="white">12</font></p>
          
        </div>
        <div class="box">
            <p><font color="white">13</font></p>
          
        </div>
        <div class="box">
            <p><font color="white">14</font></p>
          
        </div>
       
    </div>
</body>

</html>